import sys
from PyQt5 import uic
from PyQt5.QtWidgets import QApplication,QMainWindow



class Calc(QMainWindow):
    def __init__(self):
        QMainWindow.__init__(self)
        uic.loadUi('calculator.ui',self)


if __name__ == '__main__':
    app = QApplication(['calculator.py'])
    calc = Calc()
    calc.show()
    app.exec_()